#pragma once

#include "BasicEvent.h"

/**
 * This class is a filter for events that should be printed
 * to the user. It can be defined to report all events,
 * or can be given a list of certain event types
 */
class EventTypesFilter {
	bool _send_all;
	bool _etypes[events::BasicEvent::_num_EventTypes];

public:
	inline EventTypesFilter(void) : _send_all(true) {
		for (int i = 0; i < events::BasicEvent::_num_EventTypes; i++)
			_etypes[i] = false;
	}

	inline void setEvent(events::BasicEvent::EventTypes t) { _send_all = false; _etypes[t] = true; }

	inline bool filterEvent(events::BasicEvent::EventTypes t) { return (_send_all || _etypes[t]); }

};
